<?php

namespace Biz;

use Base\BaseOrmModel;
use Base\Exception\NoRecordException;
class UserAccount extends \Base\BaseBiz{

    /**
     * @param $where
     * @param $offset
     * @param $size
     * @return mixed
     * 获取周排行积分前150名
     */
    public function getUserAccountList($filed,$limit)
    {
        $rank_orm = new \Orm\UserAccount\UserAccountModel();
        return $rank_orm->getUserAccountList($filed,$limit);
    }

    /**
     * @param $data
     */
    public function insert($data){
        $user_account_model = new \Orm\UserAccount\UserAccountClass();
        $user_account_model['uid'] = $data['user_id'];
        $user_account_model['nickname'] = $data['nickname'];
        return $user_account_model->insert();
    }

    public function getUserAccountInfo($user_id){
        $user_account_model = new \Orm\UserAccount\UserAccountClass();
        return $user_account_model->loadByUserId($user_id);
    }
}